import java.util.Scanner;

public class Main {


    public static void main(String[] args) {
        if (!login()) {

        }
    }

    //登陆验证
    public static boolean login() {
        String userName="admin", password="admin";
        Scanner sc = new Scanner(System.in);
        while (true){
            System.out.println("欢迎使用超市进销存管理系统!");
            System.out.println("=============================");
            System.out.println("请您登陆：");
            System.out.print("请输入您的用户名: ");
            String tempUserName = sc.next();
            System.out.println("请输入您的密码: ");
            String tempPassword = sc.next();
            if(tempUserName.equals(userName) && tempPassword.equals(password)) {
                System.out.println("登陆成功！");
                return false;
            } else {
                System.out.println("输入的密码不正确，请重新登陆");
                return true;
            }
        }

    }
}
